<template>
  <div class="userDetail">
    <div>
      <div class="user_img"><img src="../../assets/timg2.jpg" alt=""></div>
      <div class="user_edit">
        <div>
          <p>
            <span>0</span>
            <span class="userText">粉丝</span>
          </p>
          <p>
            <span>54</span>
            <span class="userText">关注</span>
          </p>
          <p>
            <span>0</span>
            <span class="userText">获赞</span>
          </p>
        </div>
        <div>
          <div class="user_edit_btn " @click="$router.push('/edit')">编辑资料</div>
        </div>
      </div>
    </div>
    <div>
      <h2>{{userInfo.name}}</h2>
      <p>这个人很神秘，什么都没有写</p>
    </div>
    <div>
      <span>动态</span>
      <span>视频</span>
    </div>
  </div>
</template>

<script>
  export default {
    props:[
      'userInfo'
    ]
  }
</script>

<style lang="less" scoped>
  .userDetail {
    background-color: #fff;
    padding: 0 12px;
    > div:nth-child(1) {
      display: flex;
      .user_img {
        margin-right: 20px;
        img {
          height: 85px;
          width: 85px;
          border-radius: 50%;
        }
      }
      .user_edit {
        flex: 1;
        padding: 2px 10px;
        div:nth-child(1) {
          display: flex;
          p {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            font-size: 12px;
            .userText {
              color: #aaa;
            }
          }
          p:nth-child(1), p:nth-child(2) {
            border-right: 1px solid #ccc;
          }
        }
        div:nth-child(2) {
          .user_edit_btn {
            border: 1px solid #fb7a9f;
            padding: 3px;
            display: flex;
            justify-content: center;
            align-items: center;
            color: #fb7a9f;
            border-radius: 3px;
          }
        }
      }
    }
    >div:nth-child(2){
      h2{
        margin: 10px 0 3px 0;
      }
      p{
        padding: 0;
        margin: 10px 0;
        color: #999;
        font-size: 15px;
      }
    }
    >div:nth-child(3){
      padding: 10px 0;
      border-top: 1px solid #aaa;
      span{
        margin-right: 10px;
        color: #aaa;
      }
    }

  }
</style>
